Skip to content

docs: add configuration details for alert storage#538

Merged
LakshanSS merged 1 commit intoopenchoreo:mainfrom
akila-i:obs-postgres
Mar 30, 2026
Merged

docs: add configuration details for alert storage#538
LakshanSS merged 1 commit intoopenchoreo:mainfrom
akila-i:obs-postgres

Conversation

@akila-i
Copy link
Copy Markdown
Contributor

@akila-i akila-i commented Mar 30, 2026

Purpose

This pull request adds documentation for configuring alert storage backends in the Observer, providing guidance for both default (SQLite) and production-ready (PostgreSQL) setups. This helps platform engineers understand how to persist alert entries and incidents, and how to scale the Observer appropriately depending on the chosen backend.

Alert Storage Configuration:

  • Added a new section describing how the Observer persists alert entries and incidents, supporting both SQLite (default) and PostgreSQL as storage backends.

SQLite Backend:

  • Documented the default use of SQLite, including configuration options, PVC requirements, and deployment constraints (single replica, ReadWriteOnce mode, and Recreate strategy).

PostgreSQL Backend:

  • Provided step-by-step instructions for configuring PostgreSQL as the alert store, including database setup, secret management for the connection string, and scaling Observer replicas for high availability.

Related Issues

openchoreo/openchoreo#2969

Checklist

  • Updated sidebars.ts if adding a new documentation page
  • Run npm run start to preview the changes locally
  • Run npm run build to ensure the build passes without errors
  • Verified all links are working (no broken links)

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 30, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 0dec2860-4d03-4938-93f7-28259c1a7168

📥 Commits

Reviewing files that changed from the base of the PR and between 7913aec and e2c02d8.

⛔ Files ignored due to path filters (1)
  • versioned_docs/version-v1.0.x/platform-engineer-guide/observability-alerting.mdx is excluded by !versioned_docs/**
📒 Files selected for processing (1)
  • docs/platform-engineer-guide/observability-alerting.mdx
✅ Files skipped from review due to trivial changes (1)
  • docs/platform-engineer-guide/observability-alerting.mdx

📝 Walkthrough

Summary by CodeRabbit

  • Documentation
    • Added a guide for configuring alert storage backends, detailing default SQLite and an alternative PostgreSQL option for persisting alerts and incidents.
    • Notes include SQLite’s single-replica requirement and Recreate deployment strategy (install will fail with higher replica counts using ReadWriteOnce PVCs).
    • For PostgreSQL, documents provisioning the DB, adding the alert DSN to an existing secret, and switching Helm settings to enable the PostgreSQL backend.

Walkthrough

Added documentation describing how the Observer persists alert entries and incidents to selectable backends. Covers SQLite (default, single-replica, ReadWriteOnce PVC, Recreate strategy) and PostgreSQL (external DB, ALERT_STORE_DSN via ExternalSecret, Helm values for backend and replicas).

Changes

Cohort / File(s) Summary
Alert Storage Configuration Documentation
docs/platform-engineer-guide/observability-alerting.mdx
Added "Configuring Alert Storage" section documenting SQLite (default, observer.replicas: 1, ReadWriteOnce PVC, Recreate strategy) and PostgreSQL (provision DB, add ALERT_STORE_DSN to observer-secret ExternalSecret, upgrade Helm with observer.alertStoreBackend: postgresql and observer.replicas: 2).

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~4 minutes

Possibly related issues

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding configuration details for alert storage in documentation.
Description check ✅ Passed The description includes all required sections (Purpose, Related Issues, and Checklist) with comprehensive details about the changes and documentation updates.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (3)
docs/platform-engineer-guide/observability-alerting.mdx (3)

480-487: Clarify the secret name dependency.

The documentation assumes the secret is named observer-secret, but this name is configurable via the observer.secretName Helm value. Consider adding a note to clarify this or reference where users can find their configured secret name.

📝 Suggested clarification
-Update the `ExternalSecret` named `observer-secret` in the `openchoreo-observability-plane` namespace with `ALERT_STORE_DSN`:
+Update the `ExternalSecret` (typically named `observer-secret`, or as configured via `observer.secretName`) in the `openchoreo-observability-plane` namespace to include `ALERT_STORE_DSN`:

Based on context snippet 1 from the Helm reference, which shows that observer.secretName is configurable.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/platform-engineer-guide/observability-alerting.mdx` around lines 480 -
487, Clarify that the example uses a secret named observer-secret but that the
actual secret name is configurable via the Helm value observer.secretName;
update the text around the ExternalSecret example to mention observer.secretName
(and where to find it in the Helm values) and note that if the chart was
installed with a different observer.secretName the ExternalSecret resource
should use that name and not assume observer-secret in the
openchoreo-observability-plane namespace.

468-497: Consider adding database setup and troubleshooting guidance.

The PostgreSQL configuration steps are clear, but platform engineers would benefit from additional operational details:

  1. Database schema initialization: Does the Observer automatically create tables on first startup, or do users need to run migrations?
  2. Error handling: What happens if the ALERT_STORE_DSN is missing or the database is unreachable? Include troubleshooting guidance.
  3. Data migration: If switching from SQLite to PostgreSQL on an existing deployment, is there a migration path for existing alert data?
  4. Complete Helm upgrade example: Line 497 mentions "Apply the updated values with helm upgrade" but doesn't show the actual command syntax, which could be confusing for less experienced users.
💡 Example additions

After Step 1:

The Observer will automatically initialize the database schema on first startup. Ensure the PostgreSQL user has CREATE TABLE permissions.

After Step 3:

**Step 4: Verify the Observer deployment.**

```bash
kubectl logs -n openchoreo-observability-plane deployment/observer

If the Observer fails to start, check for database connection errors in the logs. Common issues include incorrect DSN format or network connectivity to PostgreSQL.


Replace line 497 with a complete example:
```markdown
Apply the updated values using:

```bash
helm upgrade openchoreo-observability-plane <chart-reference> \
  --namespace openchoreo-observability-plane \
  --values updated-values.yaml
</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against the current code and only fix it if needed.

In @docs/platform-engineer-guide/observability-alerting.mdx around lines 468 -
497, Add operational guidance for the Observer related to PostgreSQL: state
whether the Observer auto-initializes the DB schema (or requires migrations) and
note required DB permissions (e.g., CREATE TABLE) in the section around "Step 1"
and reference the Alert store user; document error handling for missing/invalid
ALERT_STORE_DSN or unreachable DB (include how to check logs via kubectl logs -n
openchoreo-observability-plane deployment/observer and common failure modes),
provide migration guidance if switching from SQLite to PostgreSQL (or point to a
migration tool/process) near the "Data migration" note, and replace the vague
"helm upgrade" line with a concrete helm upgrade invocation example that
includes release name, chart reference, namespace, and --values file while
referencing the observer.alertStoreBackend/postgresql setting and the
observer-secret ExternalSecret update.


</details>

---

`474-478`: **Add note about when ALERT_STORE_DSN is required.**

The connection string format is correct, but it would be helpful to explicitly state that `ALERT_STORE_DSN` is only required when using the PostgreSQL backend to avoid confusion.



<details>
<summary>📝 Suggested addition</summary>

```diff
 **Step 2: Add `ALERT_STORE_DSN` to the Observer Secret.**
 
+The `ALERT_STORE_DSN` environment variable is only required when `alertStoreBackend` is set to `postgresql`.
+
 The `ALERT_STORE_DSN` value must be a standard PostgreSQL connection URL:
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/platform-engineer-guide/observability-alerting.mdx` around lines 474 -
478, Add a short clarifying sentence after the ALERT_STORE_DSN connection string
that states the ALERT_STORE_DSN environment variable is only required when the
PostgreSQL backend is selected (e.g., when using the PostgreSQL alert store),
and not needed for other backends; reference the variable name ALERT_STORE_DSN
and the PostgreSQL backend in the sentence so readers know when to supply this
connection URL.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@docs/platform-engineer-guide/observability-alerting.mdx`:
- Around line 480-487: Clarify that the example uses a secret named
observer-secret but that the actual secret name is configurable via the Helm
value observer.secretName; update the text around the ExternalSecret example to
mention observer.secretName (and where to find it in the Helm values) and note
that if the chart was installed with a different observer.secretName the
ExternalSecret resource should use that name and not assume observer-secret in
the openchoreo-observability-plane namespace.
- Around line 468-497: Add operational guidance for the Observer related to
PostgreSQL: state whether the Observer auto-initializes the DB schema (or
requires migrations) and note required DB permissions (e.g., CREATE TABLE) in
the section around "Step 1" and reference the Alert store user; document error
handling for missing/invalid ALERT_STORE_DSN or unreachable DB (include how to
check logs via kubectl logs -n openchoreo-observability-plane
deployment/observer and common failure modes), provide migration guidance if
switching from SQLite to PostgreSQL (or point to a migration tool/process) near
the "Data migration" note, and replace the vague "helm upgrade" line with a
concrete helm upgrade invocation example that includes release name, chart
reference, namespace, and --values file while referencing the
observer.alertStoreBackend/postgresql setting and the observer-secret
ExternalSecret update.
- Around line 474-478: Add a short clarifying sentence after the ALERT_STORE_DSN
connection string that states the ALERT_STORE_DSN environment variable is only
required when the PostgreSQL backend is selected (e.g., when using the
PostgreSQL alert store), and not needed for other backends; reference the
variable name ALERT_STORE_DSN and the PostgreSQL backend in the sentence so
readers know when to supply this connection URL.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: de72b66a-c3ad-44cd-b3be-ba3758030771

📥 Commits

Reviewing files that changed from the base of the PR and between c37a0cf and 7913aec.

⛔ Files ignored due to path filters (1)
  • versioned_docs/version-v1.0.x/platform-engineer-guide/observability-alerting.mdx is excluded by !versioned_docs/**
📒 Files selected for processing (1)
  • docs/platform-engineer-guide/observability-alerting.mdx

rashadism
rashadism previously approved these changes Mar 30, 2026
Signed-off-by: Akila-I <akila.99g@gmail.com>
@LakshanSS LakshanSS merged commit 4899b54 into openchoreo:main Mar 30, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants